package com.remist.web.action;

import com.opensymphony.xwork2.ActionSupport;
import com.remist.common.PaginationSupport;

public class BaseAction extends ActionSupport {
	/**	serialVersionUID */
	private static final long serialVersionUID = 1L;
	private int currentPage;
	private int nextPage;
	private int totalPage;
	private int prevPage;
	public int getCurrentPage() {
		return currentPage;
	}
	public int getNextPage() {
		return nextPage;
	}
	public int getTotalPage() {
		return totalPage;
	}
	public int getPrevPage() {
		return prevPage;
	}
	public void setCurrentPage(int currentPage) {
		this.currentPage = currentPage;
	}
	public void setNextPage(int nextPage) {
		this.nextPage = nextPage;
	}
	public void setTotalPage(int totalPage) {
		this.totalPage = totalPage;
	}
	public void setPrevPage(int prevPage) {
		this.prevPage = prevPage;
	} 
	
	public void setPageInfo( PaginationSupport ps ) {
		this.nextPage = ps.getNextIndex();
		this.prevPage = ps.getPreviousIndex();
		this.totalPage = ps.getTotalCount();
	}
}
